FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.12-slim
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN useradd dingtalk
WORKDIR /ding-talk/
COPY app.py config.ini  Dockerfile LICENSE README.md requirements.txt /ding-talk/
COPY ding /ding-talk/ding
RUN pip3 install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
RUN chown -R dingtalk:dingtalk /ding-talk/
USER dingtalk
EXPOSE 5000
CMD ["python","app.py"]
